import {tuple} from './0_common'
/**
 * 索引签名 Tuple[number] ==> 'string'|'number'|'boolean'
 * 索引访问 Tuple[index]==> Tuple[0]
 */
type TupleToObject<T extends any[]> = {
  [ P in T[number]] : P;
}
type o = TupleToObject<tuple>
/**
 * 获取元组的长度
 */
type Length<T extends any[]> = T['length'];
type l = Length<tuple>;
/**
 * 获取元组的第一个元素
 * extends+infer模式匹配
 */
type First<T extends any[]> = T[0];
type First1<T extends any[]> = T extends [infer F, ...infer R] ? F : never;

type f = First<tuple>;
type f1 = First1<tuple>;

